package io.renren.config.feign;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;


/**
 * @Description feign认证拦截器
 * @Author finger
 * @Date 2020/8/7 0007
 * @Version 1.0
 */
@Slf4j
public class FeignInterceptor implements RequestInterceptor {

  public FeignInterceptor() {
  }

  @Override
  public void apply(RequestTemplate template) {
    log.info("feign request url is " + template.url());
    if (template.body() != null) {
      log.info("feign request body is " + new String(template.body()));
    }
  }
}
